草庐IT

ios - RxSwift 和 UIPickerView

全部标签

ios - Objective-C/Xcode 状态栏颜色与导航栏颜色相同

我试图让我的状态栏和我的导航栏颜色相同,而不是和我的背景颜色相同。我还没有找到任何适用于iOS12Objective-C的解决方案,并且不会让我的应用程序被应用程序商店禁止。这就是我设置导航栏的方式:[navControllersetBarTintColor:[UIColorcolorWithRed:0.26green:0.53blue:0.96alpha:1.0]];[navControllersetTranslucent:FALSE];[navControllersetBarStyle:UIBarStyleBlack];[navControllersetTintColor:[UIC

ios - 在 Mac IOS 上获取 Ionic 构建错误

我在为IOS构建Ionic时遇到一些错误,而Mac上的“Ionicserve”工作正常。我正在运行这个命令:ioniccordovabuildios构建错误是:Infileincludedfrom/Users/mohsinjaved/Documents/GitHub/V2/app/platforms/ios/appname/Plugins/cordova-plugin-ionic-webview/IONAssetHandler.m:1:/Users/mohsinjaved/Documents/GitHub/V2/app/platforms/ios/appname/Plugins/cor

ios - Swift 4.2 委托(delegate)和协议(protocol)不起作用

我有UIViewController(profileViewController),其中有collectionView,collectionView有headerCell其中有segmentedControl,当segmentedControl值改变时,我想老虎delegate方法但它不起作用,在这里是代码,这是collectioviewheadercell和协议(protocol)的类。importUIKit//ProtocolprotocolheaderCellSegmentedDelegate{funcchangeTabe(whichOne:String)}//HeaderCel

ios - SSL 操作失败并显示代码,同时向 iOS 设备发送推送通知

我正在尝试向运行良好的iOS设备发送推送通知,但突然开始抛出以下错误:stream_socket_client():SSLoperationfailedwithcode1.OpenSSLErrormessages:error:14094438:SSLroutines:ssl3_read_bytes:tlsv1alertinternalerror我检查了服务器端口2195和2916都已启用,并仔细检查了.pem文件,这似乎也是正确的。如果我能就上述错误获得帮助,我将不胜感激。谢谢 最佳答案 HiyoushouldexportApple

ios - 如何使用image发送通知 - react-native-firebase

我是新手RN,我对ReactNativeFirebase发送通知有问题,我不想寻找解决方案来推送图像通知。任何帮助都非常感谢。 最佳答案 尝试。。。constnotification=newfirebase.notifications.Notification().setNotificationId('notificationId:'+data.id).setTitle(data.title).setBody(data.body);notification.android.setChannelId('yourChannel').an

ios - 如何渲染 CALayerGradient 二次曲线?

我正在尝试在CGContext中使用CALayerGradient渲染圆锥渐变letcolors=[UIColor(hue:0,saturation:1.0,brightness:1.0,alpha:1.0).cgColor,UIColor(hue:1/6,saturation:1.0,brightness:1.0,alpha:1.0).cgColor,UIColor(hue:2/6,saturation:1.0,brightness:1.0,alpha:1.0).cgColor,UIColor(hue:0.5,saturation:1.0,brightness:1.0,alpha:1

ios - TableView 不更新

我正在尝试为餐厅制作一个点餐应用程序,当我第一次将项目添加到购物车时,表格View加载了我制作的单例数组。但是当我返回菜单并选择另一个项目时,数组已更新但购物车的表格View没有,我正在使用tabbarcontroller。尝试在不同的地方使用tableview.reloadData()仍然没有出现添加到数组的新数据classCartVC:UIViewController,UITableViewDelegate,UITableViewDataSource{@IBOutletweakvarpriceLbl:UILabel!@IBOutletweakvartableView:UITable

ios - 滚动页面时如何隐藏和显示 View

我写了这段代码,我隐藏了Viewself.tableView.tableHeaderView=nil但是如果我再试一次,这段代码就不行了tableView.tableHeaderView=tableHeaderView请帮帮我我的代码funcscrollViewDidScroll(_scrollView:UIScrollView){if(self.lastContentOffsetscrollView.contentOffset.y){iftableView.tableHeaderView==nil{//movedtobottomtableView.tableHeaderView=pr

ios - 在 iPhone XS 上使用 ARKit2 和 Vision (VNDetectFaceRectanglesRequest) 时如何修复 IOAF 代码 GPU 错误

在iPhoneXS(使用iOS12.1.2和Xcode10.1)上运行ARKit时,我在运行视觉代码以检测面部边界时遇到错误和崩溃/挂起。我遇到的错误是:2019-01-0403:03:03.155867-0800ARKitVisionDemo[12969:3307770]Executionofthecommandbufferwasabortedduetoanerrorduringexecution.CausedGPUTimeoutError(IOAFcode2)2019-01-0403:03:03.155786-0800ARKitVisionDemo[12969:3307850]Ex

ios - 为什么 Swift4 会转换一个 UIButton 数组!到 [UIButton?] 类型?

今天遇到一个奇怪的问题。请看这段代码:classA{varbutton1:UIButton!varbutton2:UIButton!funcfoo(){letarray=[button1,button2]}}Xcode表示array是[UIButton?]类型。出于某种原因,Swift4将UIButton!元素转换为UIButton?。为什么? 最佳答案 解释ImplicitlyUnwrappedOptional不是一个独特的类型,而是一个普通的Optional声明其值的属性可能会被隐式强制(基于SE-0054):However,t